package oopcodeblock.codeblockDemo1;

//该类用于演示局部代码块及其作用

public class Text {
    public static void main(String[] args) {
        {
            int a = 10;
            System.out.println("这是第一次输出:a =" + a);
        }//代码执行到这里的时候,变量a就从内存中消失了

        //System.out.println("这是第二次输出:a =" + a);

        Student s1 = new Student();
        Student s2 = new Student("zhangsan",20);
    }
}
